<template>
  <div>
    <van-sticky>
      <van-nav-bar title="历史投递列表" left-text="返回" left-arrow @click-left="onClickLeft" right-text="首页"
        @click-right="onClickRight" />
    </van-sticky>

    <div class="main">
      <div class="each" v-for="item in deliverList.rows" :key="item.id">
        <div class="list_header">
          <div class="postName">
            <span>
              {{item.postName}}
            </span>
          </div>
          <div class="companyName">
            <span>
              {{item.companyName}}
            </span>
          </div>
        </div>
<div class="list_footer">
          <div class="userName">
          <span>
           投递人：<span class="name_text"> {{item.userName}}</span>
          </span>
        </div>
        <div class="satrTime">
          <span>
           时间： {{item.satrTime}}
          </span>
        </div>
</div>



      </div>
    </div>
  </div>
</template>

<script>
import nav from "@/mixin/nav";
import { deliverList } from "@/service/job/jobservice"
export default {
  mixins: [nav],
  data() {
    return {
      deliverList: [],
    }
  },

  async created() {
    this.userId = JSON.parse(window.localStorage.getItem("userId"));
    let { data } = await deliverList(this.userId)
    this.deliverList = data
    console.log(JSON.parse(JSON.stringify(data.rows)));
    // console.log(data);
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    },
    onClickRight() {
      this.$router.push("/")
    },
  }
}
</script>

<style lang="scss" scoped>
.main {
  padding: 5px;
  background:#ccc;
  .each {
    padding: 8px;
    width: 100%;
    border-radius: 5px;
    // height: 100px;
background-color: #fff;
    margin-bottom: 5px;

    .list_header {
      display: flex;
      justify-content: space-between;
    }
    .list_footer{
      margin-top: 30px;
      display: flex;
      justify-content: space-between;
    }
  }

  .postName {
    span {
      font-size: 18px;
      font-weight: 700;
      color: rgb(255, 85, 46);
    }
  }

  .companyName {
  
    span {
      
      color: rgb(168, 168, 168)
    }
  }
  .userName{
    .name_text{
      font-size: 16px;
      font-weight: 600;
    }
  }
  .satrTime{
    font-size: 13px;
    color: rgb(168, 168, 168)
  }
}
</style>>

